import request from '@/router/axios';

export const getList = (current, size, params,state) => {
  return request({
    url: '/api/blade-supplier-management/supplierprofile/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
      state
    }
  })
}

//查看
export const detail = (id) => {
  return request({
    url: '/api/blade-supplier-management/supplierinfo/detail',
    method: 'get',
    params: {
      id
    }
  })
}


export const associatedUserList = (supplierNo) => {
  return request({
    url: '/api/blade-supplier-management/supplierprofile/associatedUserList',
    method: 'get',
    params: {
      supplierNo
    }
  })
}

export const saveAssociatedUser = (data) => {
  return request({
    url: '/api/blade-supplier-management/supplierprofile/saveAssociatedUser',
    method: 'post',
    data
  })
}

export const removeAssociateUser = (id) => {
  return request({
    url: '/api/blade-supplier-management/supplierprofile/removeAssociateUser',
    method: 'post',
    params: {
      id
    }
  })
}

export const updateMaterialGroup = (data) => {
  return request({
    url: '/api/blade-supplier-management/supplierinfo/updateMaterialGroup',
    method: 'post',
    data
  })
}
